/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部样式 */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px 30px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    color: #4a5568;
    font-size: 2rem;
    font-weight: 700;
}

.header-controls {
    display: flex;
    gap: 10px;
}

/* 主要内容区域 */
.main-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 20px;
    flex: 1;
}

/* 左侧面板 */
.left-panel {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.panel-header h3 {
    color: #4a5568;
    font-size: 1.2rem;
    font-weight: 600;
}

.line-info {
    font-size: 0.9rem;
    color: #718096;
    font-weight: 500;
}

/* 代码编辑器 */
.code-editor-container {
    flex: 1;
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #e2e8f0;
}

.CodeMirror {
    height: 100% !important;
    font-family: 'Fira Code', 'Monaco', 'Menlo', monospace;
    font-size: 14px;
    line-height: 1.5;
}

.CodeMirror-line-highlight {
    background: rgba(255, 235, 59, 0.3) !important;
}

.breakpoint-gutter {
    width: 20px;
}

.breakpoint-marker {
    color: #e53e3e;
    font-size: 16px;
    cursor: pointer;
}

/* 调试控制面板 */
.debug-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* 右侧面板 */
.right-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.variables-panel,
.breakpoints-panel,
.output-panel {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.variables-panel {
    flex: 1;
}

.breakpoints-panel {
    min-height: 200px;
}

.output-panel {
    flex: 1;
}

/* 变量容器 */
.variables-container {
    max-height: 300px;
    overflow-y: auto;
}

.variable-item {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.variable-item:hover {
    background: #edf2f7;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.variable-name {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 4px;
}

.variable-value {
    color: #4a5568;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
}

.variable-type {
    color: #718096;
    font-size: 0.8rem;
    font-style: italic;
}

/* 断点管理 */
.breakpoint-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.breakpoint-controls input {
    width: 80px;
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
}

.breakpoints-container {
    max-height: 150px;
    overflow-y: auto;
}

.breakpoint-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fed7d7;
    border: 1px solid #feb2b2;
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 6px;
}

.breakpoint-line {
    font-weight: 600;
    color: #c53030;
}

.remove-breakpoint {
    background: none;
    border: none;
    color: #c53030;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.remove-breakpoint:hover {
    background: rgba(197, 48, 48, 0.1);
}

/* 输出面板 */
.output-tabs {
    display: flex;
    margin-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.tab-btn {
    background: none;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-weight: 500;
    color: #718096;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.tab-btn.active {
    color: #4299e1;
    border-bottom-color: #4299e1;
}

.tab-btn:hover {
    color: #4299e1;
}

.output-container {
    position: relative;
    height: 200px;
}

.tab-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #1a202c;
    color: #e2e8f0;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    padding: 15px;
    border-radius: 8px;
    overflow-y: auto;
    white-space: pre-wrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.tab-content.active {
    opacity: 1;
    visibility: visible;
}

/* 按钮样式 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-primary {
    background: linear-gradient(135deg, #4299e1, #3182ce);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
}

.btn-info {
    background: linear-gradient(135deg, #4fd1c7, #38b2ac);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #f56565, #e53e3e);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #a0aec0, #718096);
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

/* 状态栏 */
.status-bar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 15px 30px;
    margin-top: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
}

/* 消息提示 */
.message-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.message {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #4299e1;
    animation: slideIn 0.3s ease;
    max-width: 300px;
}

.message.success {
    border-left-color: #48bb78;
}

.message.error {
    border-left-color: #f56565;
}

.message.warning {
    border-left-color: #ed8936;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 无数据提示 */
.no-data {
    text-align: center;
    color: #a0aec0;
    font-style: italic;
    padding: 20px;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
    }
    
    .right-panel {
        flex-direction: row;
        gap: 20px;
    }
    
    .variables-panel,
    .breakpoints-panel,
    .output-panel {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .right-panel {
        flex-direction: column;
    }
    
    .debug-controls {
        justify-content: center;
    }
    
    .btn {
        flex: 1;
        min-width: 120px;
    }
} 